package org.csmzxy.class2333;

public class Example02 {
    public static void main(String[] args){
        //创建一个内容为空的字符串
        String s1 = new String();
        System.out.println("s1= "+s1);
        //创建一个内容为ABC的字符串
        String s2 = new String("靑花巷");
        System.out.println("s2= "+s2);
        //创建一个内容为字符数组的字符串
        char[] chars ={'h','e','1','1','0'};
        String s3 = new String(chars);
        System.out.println("s3= "+s3);
        //创建一个内容为字节数组的字符串
        byte[] bytes = {97,98,99};
        String s4 = new String(bytes);
        System.out.println("S4= "+s4);
    }
}
